The tie/slur problem

While typesetting notes and even beams is a rather simple problem because it is a local typesetting, ties and slurs are much more difficult to handle.

Of course there is small problem in case of a typesetter wanting a slur or a tie binding two consecutive notes, not separated by a bar. In practice this very restricted use of slurs or ties can easily be solved by putting some symbols extracted from the normalshapemediumseriesslur16 or normalshapemediumseriesslurn16/normalshapemediumseriesslurn20 fonts somewhere on the staffs using the general use normalshapemediumseriesnormalshapemediumseries\zcharnote macro.

But serious music typesetters or composers know that many ties are supposed to link notes which are on both sides of a bar, which is a likely place to insert line breakings, so that the coding of ties must have various versions and sizes to resist that possible line breaking. What has been said about ties is still more serious in the case of phrasing slurs which may extend over several bars, lines and sometimes pages. In this case, their shape is not only a question of producing a long curved symbol of nice looking shape, it also has to cope with glue. An then the worst is that music way of typing does not accept ragged lines but equal length lines, even for the last line of a music piece. Thus, long distance slurs and ties need to be cut into separate parts (beginning, continuing(s), endings) which TEX can only link using horizontal line overlaps or normalshapemediumseriesnormalshapemediumseries\leaders to insure slur continuity over this unavoidable glue.

Therefore and up to now, ties and slurs have been implemented in a way which may look rather ugly, but we think it is the only way of implementing in one pass ties and slurs which run across glue. The principle is to have tie/slur symbols with a rather long horizontal part. Then, at each time a glue occurs and at each time a group of notes is coded while a slur or tie is pending, an normalshapemediumseriesnormalshapemediumseries\hrule is issued which overlaps the preceding tie/slur symbol so that the final output seems to contain a continuous line. Unfortunately, this is possible only in the glue expansion direction, namely in the horizontal direction.

Variable size initial and final curved slur symbols have recently been implemented; the user has to choose them according to his intention to have short or long range slur symbols.